package com.hr.mes.entity;

import com.hr.mes.enums.FieldType;

import java.util.Date;

/**
 * 表单对应的字段，basal_form_fields
 */
public class FormFields {

    private Integer id;

    /**
     * 表单模板id
     */
    private Integer formTemplateId;

    /**
     * 字段名(英文)
     */
    private String fieldName;

    /**
     * 字段名(中文)
     */
    private String fieldTitle;

    /**
     * 字段的控件类型
     */
    private FieldType fieldType;

    /**
     * 字段名的placeholder，fieldType=TEXT才有效
     */
    private String fieldLabel;

    /**
     * 0：可不填，1：必须填
     */
    private Integer isRequired;

    /**
     * json字符串格式，fieldType是CHECKBOX或RADIO时生效
     */
    private String options;

    /**
     * 校验规则(正则表达式)
     */
    private String validateRule;

    /**
     * 顺序
     */
    private Integer sortOrder;

    /**
     * 是否允许重复添加
     */
    private Integer repeat;

    private Date createTime;

    private Integer createBy;

    private Date updateTime;

    private Integer updateBy;

    public FormFields() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getFormTemplateId() {
        return formTemplateId;
    }

    public void setFormTemplateId(Integer formTemplateId) {
        this.formTemplateId = formTemplateId;
    }

    public String getFieldName() {
        return fieldName;
    }

    public void setFieldName(String fieldName) {
        this.fieldName = fieldName;
    }

    public String getFieldTitle() {
        return fieldTitle;
    }

    public void setFieldTitle(String fieldTitle) {
        this.fieldTitle = fieldTitle;
    }

    public FieldType getFieldType() {
        return fieldType;
    }

    public void setFieldType(FieldType fieldType) {
        this.fieldType = fieldType;
    }

    public String getFieldLabel() {
        return fieldLabel;
    }

    public void setFieldLabel(String fieldLabel) {
        this.fieldLabel = fieldLabel;
    }

    public Integer getIsRequired() {
        return isRequired;
    }

    public void setIsRequired(Integer isRequired) {
        this.isRequired = isRequired;
    }

    public String getOptions() {
        return options;
    }

    public void setOptions(String options) {
        this.options = options;
    }

    public String getValidateRule() {
        return validateRule;
    }

    public void setValidateRule(String validateRule) {
        this.validateRule = validateRule;
    }

    public Integer getSortOrder() {
        return sortOrder;
    }

    public void setSortOrder(Integer sortOrder) {
        this.sortOrder = sortOrder;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public Integer getRepeat() {
        return repeat;
    }

    public void setRepeat(Integer repeat) {
        this.repeat = repeat;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getCreateBy() {
        return createBy;
    }

    public void setCreateBy(Integer createBy) {
        this.createBy = createBy;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(Integer updateBy) {
        this.updateBy = updateBy;
    }

    @Override
    public String toString() {
        return "FormFields{" +
                "id=" + id +
                ", formTemplateId=" + formTemplateId +
                ", fieldName='" + fieldName + '\'' +
                ", fieldTitle='" + fieldTitle + '\'' +
                ", fieldType=" + fieldType +
                ", fieldLabel='" + fieldLabel + '\'' +
                ", isRequired=" + isRequired +
                ", options='" + options + '\'' +
                ", validateRule='" + validateRule + '\'' +
                ", sortOrder=" + sortOrder +
                ", repeat=" + repeat +
                ", createTime=" + createTime +
                ", createBy=" + createBy +
                ", updateTime=" + updateTime +
                ", updateBy=" + updateBy +
                '}';
    }
}
